var seeSvc = require("../../services/seeSvc");
var selfMediaSvc = require("../../services/selfMediaSvc");

//自媒体
exports.selfMedia = function (req, res) {
    res.render("see/selfMedia");
};
//获取自媒体主页轮播图列表
exports.getMainCarouselList = function (req, res) {
    selfMediaSvc.getMainCarouselList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取头条新闻信息
exports.getHotNewsList = function (req, res) {
    selfMediaSvc.getHotNewsList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//通过当前登录用户id获取分类信息
exports.getUserCategoryList = function (req, res) {
    selfMediaSvc.getUserCategoryList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取自媒体主页top10列表
exports.getMainTop10List = function (req, res) {
    selfMediaSvc.getMainTop10List(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取自媒体人气分页信息
exports.getMainHotAdvList = function (req, res) {
    selfMediaSvc.getMainHotAdvList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取所有自媒体分类信息
exports.getMainAllCategoryList = function (req, res) {
    selfMediaSvc.getMainAllCategoryList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取主页圈子列表
exports.getCirclesList = function (req, res) {
    selfMediaSvc.getCirclesList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取自媒体主页附近分页信息
exports.getMainNearbyAdvList = function (req, res) {
    selfMediaSvc.getMainNearbyAdvList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//增加自媒体用户分类信息
exports.addUserCategory = function (req, res) {
    selfMediaSvc.addUserCategory(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};

//获取自媒体top10列表
exports.getMediaTop10List = function (req, res) {
    selfMediaSvc.getMediaTop10List(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取自媒体圈子列表
exports.getMediaCirclesList = function (req, res) {
    selfMediaSvc.getMediaCirclesList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取自媒体人气分页信息
exports.getMediaHotAdvList = function (req, res) {
    selfMediaSvc.getMediaHotAdvList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//增加自媒体附近分页信息
exports.getMediaNearbyAdvList = function (req, res) {
    selfMediaSvc.getMediaNearbyAdvList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};

//自媒体二级页面
exports.selfMediaPage = function (req, res) {
    res.render("see/selfMediaPage");
};
//自媒体分类轮播
exports.getCategoryCarouselList = function (req, res) {
    selfMediaSvc.getCategoryCarouselList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取自媒体分类top10列表
exports.getCategoryTop10List = function (req, res) {
    selfMediaSvc.getCategoryTop10List(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取自媒体分类人气分页信息
exports.getCategoryHotAdvList = function (req, res) {
    selfMediaSvc.getCategoryHotAdvList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取自媒体分类页附近分页信息
exports.getCategoryNearbyAdvList = function (req, res) {
    selfMediaSvc.getCategoryNearbyAdvList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取分类页圈子列表
exports.getCategoryCirclesList = function (req, res) {
    selfMediaSvc.getCategoryCirclesList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取中国省市区列表
exports.getChinaList = function (req, res) {
    selfMediaSvc.getChinaList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取海外国家 ,州市列表, 州和市
exports.getCountryStateList = function (req, res) {
    selfMediaSvc.getCountryStateList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//自媒体筛选
exports.mediaScreen = function (req, res) {
    res.render("see/mediaScreen");
};
//筛选-自媒体分类页-查询配置
exports.getCategoryQuery = function (req, res) {
    selfMediaSvc.getCategoryQuery(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//筛选-结果
exports.getCategoryQueryList = function (req, res) {
    selfMediaSvc.getCategoryQueryList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取自媒体筛选分页信息
exports.getCategorySearchAdvList = function (req, res) {
    selfMediaSvc.getCategorySearchAdvList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取自媒体圈子筛选
exports.getMediaSearchCirclesList = function (req, res) {
    selfMediaSvc.getMediaSearchCirclesList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//自媒体视频页
exports.selfMediaVd = function (req, res) {
    res.render("see/selfMediaVd");
};
//自媒体-获取企业广告视频信息
exports.getMediaAdvAdvById = function (req, res) {
    selfMediaSvc.getMediaAdvAdvById(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//通过用户id 视频id state点赞状态 1点赞0取消点赞
exports.getCityAdPraise = function (req, res) {
    selfMediaSvc.getCityAdPraise(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//通过用户id 视频id state收藏状态 1收藏0取消收藏
exports.getCityAdCollection = function (req, res) {
    selfMediaSvc.getCityAdCollection(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取城市广告评论列表
exports.getCityAdCommentList = function (req, res) {
    selfMediaSvc.getCityAdCommentList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//城市打赏
exports.cityAdReward = function (req, res) {
    selfMediaSvc.cityAdReward(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//城市广告-游记购买展位
exports.buyBooth = function (req, res) {
    selfMediaSvc.buyBooth(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//职位详情
exports.jobDetails = function (req, res) {
    res.render("see/jobDetails");
};
//通过招聘id获取招聘信息
exports.getRecruitById = function (req, res) {
    selfMediaSvc.getRecruitById(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//自媒体打赏
exports.mediaReward = function (req, res) {
    selfMediaSvc.mediaReward(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//自媒体-发表评论
exports.comment = function (req, res) {
    selfMediaSvc.comment(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//自媒体评论点赞
exports.praiseMediaAdvComment = function (req, res) {
    selfMediaSvc.praiseMediaAdvComment(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//自媒体-获取评论回复列表
exports.getInfoMediaAdvCommentReplyList = function (req, res) {
    selfMediaSvc.getInfoMediaAdvCommentReplyList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//评论详情
exports.commentInfo = function (req, res) {
    res.render("see/commentInfo");
};
//自媒体-评论回复-详情
exports.getAdvCommentsByCommentId = function (req, res) {
    selfMediaSvc.getAdvCommentsByCommentId(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//城市广告
exports.cityAd = function (req, res) {
    res.render("see/cityAd");
};
//城市广告主页信息
exports.getMain = function (req, res) {
    selfMediaSvc.getMain(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//城市广告主页信息
exports.getCityAdvList = function (req, res) {
    selfMediaSvc.getCityAdvList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//城市广告主页信息
exports.getCityNearbyAdvList = function (req, res) {
    selfMediaSvc.getCityNearbyAdvList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//城市广告热门列表
exports.cityAdHotlist = function (req, res) {
    res.render("see/cityAdHotlist");
};
//获取城市广告热门城市列表
exports.getAllHots = function (req, res) {
    selfMediaSvc.getAllHots(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//城市广告详情
exports.cityAdInfo = function (req, res) {
    res.render("see/cityAdInfo");
};
//获取城市广告详细信息
exports.getCityInfoById = function (req, res) {
    selfMediaSvc.getCityInfoById(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取城市广告分类列表
exports.getCategoryCityAdvList = function (req, res) {
    selfMediaSvc.getCategoryCityAdvList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//城市广告游记详情
exports.travelsInfo = function (req, res) {
    res.render("see/travelsInfo");
};
//获取城市游记详情
exports.getCityAdvInfo = function (req, res) {
    selfMediaSvc.getCityAdvInfo(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//城市广告-选择城市
exports.chooseCity = function (req, res) {
    res.render("see/chooseCity");
};
//城市广告-发游记
exports.travelNotes = function (req, res) {
    res.render("see/travelNotes");
};
//城市广告视频页
exports.cityAdVideo = function (req, res) {
    res.render("see/cityAdVideo");
};
//获取城市视频详情
exports.getCityAdvMediaInfo = function (req, res) {
    selfMediaSvc.getCityAdvMediaInfo(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//通过用户id 视频id state点赞状态 1点赞0取消点赞
exports.getPraise = function (req, res) {
    selfMediaSvc.getPraise(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//通过用户id 视频id state收藏状态 1收藏0取消收藏
exports.getCollection = function (req, res) {
    selfMediaSvc.getCollection(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//获取自媒体评论列表
exports.getInfoMediaAdvCommentList = function (req, res) {
    selfMediaSvc.getInfoMediaAdvCommentList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//自媒体-打开红包
exports.getRedPacketsMediaAdvById = function (req, res) {
    selfMediaSvc.getRedPacketsMediaAdvById(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//城市广告-城市搜索
exports.citySearch = function (req, res) {
    res.render("see/citySearch");
};
//城市广告-搜索结果列表页
exports.citySearchList = function (req, res) {
    res.render("see/citySearchList");
};

//乐看搜索历史
exports.searchHistory = function (req, res) {
    selfMediaSvc.searchHistory(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//搜索自媒体-提示框
exports.searchMedia = function (req, res) {
    selfMediaSvc.searchMedia(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//清空自媒体搜索历史
exports.emptySearchHistory = function (req, res) {
    selfMediaSvc.emptySearchHistory(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};
//自媒体-搜索-列表
exports.searchMediaList = function (req, res) {
    selfMediaSvc.searchMediaList(req.body, null, function (b) {
        if (b.error || b.json.code !== 200) {
            res.send(b.json);
        } else {
            res.send(b.body);
        }
    });
};